package com.platform.base.domain;

import java.math.BigDecimal;

import com.baomidou.mybatisplus.annotation.TableField;
import com.platform.common.annotation.Excels;
import com.platform.common.core.domain.TreeEntity;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.platform.common.annotation.Excel;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import javax.validation.constraints.NotBlank;
import com.platform.common.core.domain.BaseEntity;
import com.platform.common.annotation.Excel.Type;
import com.platform.system.domain.SysDept;

/**
 * 住户信息对象 base_location
 *
 * @author wangqi
 * @date 2020-09-24
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("base_location")
public class BaseLocation extends TreeEntity
{
    private static final long serialVersionUID = 1L;

    /** 地址id */
    @TableId(type = IdType.AUTO)
    private Long locationId;

    /** 地址名称 */
    @NotBlank(message = "地址名称不能为空")
    @Excel(name = "地址名称")
    private String locationName;

   /* @TableField(exist = false)
    @Excel(name = "地址类型")
    private String typeName;

    *//** 地址类型 *//*
    @NotBlank(message = "地址类型不能为空")
    private String locationType;*/
    /** 地址类型 */
    @Excel(name = "地址类型", readConverterExp = "01=(总)公司,02=(分)公司,03=小区,04=楼(幢),05=单元,06=热户,07=换热站,08=热力站")
    private String locationType;

    @Excel(name = "供暖状态（0=未缴费,1=缴费）", readConverterExp = "0=未缴费,1=缴费")
    private String status;

    @TableField(exist = false)
    @Excel(name = "一级地址")
    private String parent1;

    @TableField(exist = false)
    @Excel(name = "二级地址")
    private String parent2;

    @TableField(exist = false)
    @Excel(name = "三级地址")
    private String parent3;

    @TableField(exist = false)
    @Excel(name = "四级地址")
    private String parent4;

    @TableField(exist = false)
    @Excel(name = "五级地址")
    private String parent5;

    /** 建筑面积 */
    @Excel(name = "建筑面积")
    private BigDecimal buildArea;

    /** 部门ID */
    private Long deptId;

    /** 计费面积 */
    @Excel(name = "计费面积")
    private BigDecimal costArea;

    /** 用户姓名 */
    @Excel(name = "用户姓名")
    private String locationHode;

    /** 报警状态 */
    @Excel(name = "报警状态")
    private String alarmStatus;

    /** 联系方式 */
    @Excel(name = "联系方式")
    private String locationContact;

    /** 用户号 */
    @Excel(name = "用户号")
    private String locationNumber;

    /** 删除标识0正常1删除 */
    private String delFlag;

    /** 采集器数量 */
    @TableField(exist = false)
    private Integer collectorCount;

    /** 阀门数量 */
    @TableField(exist = false)
    private Integer valveCount;

    /** 热表数量 */
    @TableField(exist = false)
    private Integer meterCount;

    /** 温度采集器数量 */
    @TableField(exist = false)
    private Integer tempCount;

    /** 父级名称 */
    @TableField(exist = false)
    private String parentName;

    /** 部门对象 */
    @Excels({
            @Excel(name = "部门名称", targetAttr = "deptName", type = Type.EXPORT)
    })
    @TableField(exist = false)
    private SysDept dept;

    @Excel(name = "部门名称", type = Type.IMPORT)
    @TableField(exist = false)
    private String deptName;
    public SysDept getDept()
    {
        if (dept == null)
        {
            dept = new SysDept();
        }
        return dept;
    }




}
